<?php

namespace App\Jobs\Content;

use App\Enums\ContentNameEnum;
use App\Jobs\Job;
use Carbon\Carbon;

//群管理审核JOB
//在audit项目中消费
class GroupJob extends Job
{
    protected $data;

    public function __construct($data = [])
    {

        $this->data = [
            'key_id' => $data['key_id'] ?? 0,
            'app_id' => env('CONTENT_APP_ID'),
            'user_id' => $data['user_id'] ?? 0,
            'group_id' => $data['group_id'] ?? 0,
            'content_name' => $data['content_name'] ?? ContentNameEnum::GROUP_NAME,
            'content_type' => $data['content_type'] ?? 1,
            // 机审结果
            'machine_result' => $data['machine_result'] ?? '',
            // 审核前内容,如果审核失败需要还原成此内容
            'content_origin' => $data['content_origin'] ?? '',
            // 群管理更改内容
            'content' => $data['content'] ?? '',
            'pictures' => $data['pictures'] ?? '',
            'videos' => $data['videos'] ?? '',
            'voices' => $data['voices'] ?? '',

            'add_time' => Carbon::now()->timestamp,
        ];
    }
}